<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  <meta name="format-detection" content="telephone=no" />
  <title>认证绑卡</title>
  <link rel="stylesheet" href="../../css/reset.css" />
  <style>
    body {
      width: 100%;
      background-color: #fff;
      font-size: 0.26rem;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      font-family: Helvetica;
      color: #333333;
      height: auto;
    }

    .checkmessage {
      width: 100%;
      height: auto;
      display: flex;
      display: -webkit-flex;
      flex-direction: column;
      padding-left: 0.24rem;
      box-sizing: border-box;
      border-top: 0.2rem solid #f7f7f7;
    }

    .checkmessage div {
      width: 100%;
      border-bottom: 1px solid #e5e5e5;
      box-sizing: border-box;
      padding-bottom: 0.1rem;
    }

    .checkmessage input {
      outline: none;
      border: none;
      display: inline-block;
      width: 100%;
      height: 0.92rem;
      box-sizing: border-box;
      font-size: 0.26rem;
    }

    .nextbutton {
      width: 6.88rem;
      height: 0.9rem;
      text-align: center;
      line-height: 0.9rem;
      background-color: #ffd203;
      outline: none;
      border: none;
      border-radius: 0.1rem;
      margin-top: 0.8rem;
      margin-left: calc((100% - 6.88rem) / 2);
      font-size: 0.28rem;
    }
  </style>
</head>

<body>
  <div class="checkmessage">
    <div>
      <input type="text" name="" id="userName" placeholder="请输入你的真实姓名;认证后,不能修改" maxlength="30" />
    </div>
    <div>
      <input type="text" name="" id="userNumber" placeholder="请输入你的身份证号;认证后,不能修改" maxlength="30" />
    </div>
  </div>
  <p class="showText" style="padding:0.24rem;display: none;">
    注：若信息有误请联系客服
  </p>
  <button class="nextbutton">下一步</button>
  <script src="../../script/autosize.js"></script>
  <script src="../../script/fastclick.js"></script>
  <script src="../../script/jquery_three_two_one.js"></script>
  <script src="../../script/app.js"></script>
</body>

</html>
<script>
  apiready = function () {
    var app = new APP();
    var goMyPage;
    if (api.pageParam.goMyPage != undefined && api.pageParam.goMyPage) {
      goMyPage = api.pageParam.goMyPage;
    }
    if (api.pageParam.userName && api.pageParam.userIdNumber) {
      $("#userName").val(api.pageParam.userName);
      $("#userNumber").val(api.pageParam.userIdNumber);
      $(".checkmessage input").attr("readonly", "readonly");
      $(".showText").show();
    }
    $(".nextbutton").on("click", function () {
      var card = $("#userNumber").val();
      var name = $("#userName").val();
      if (!name) {
        app.toast("姓名不能为空");
        return;
      }
      if (!card) {
        app.toast("身份证号不能为空");
        return;
      }
      // if (app.getAge(card, 3) > 70 || app.getAge(card, 3) < 18) {
      //   app.toast("购买本平台产品有风险，请确保您的年龄范围在18~70岁");
      //   return;
      // }
      var pageValue = {
        name: "uploadpicture",
        subpage: "my/uploadpicture",
        title: "上传身份证件",
        param: {
          pageName: "uploadpicture",
          userName: name.trim(),
          userCardNumber: card.trim(),
          goMyPage: goMyPage,
          type: "idCard"
        }
      }
      app.setNavBarAttr(pageValue);
    });
    app.listen("auth_commit_success", function () {
      app.closeW();
    });
    app.listen("goMain", function () {
      app.closeW();
    })
    app.headerMap();
  };
</script>